package com.design.proxy;

/**
 * @author leali
 * @title: AccessValidator
 * @projectName design
 * @description: AccessValidator：身份验证类，业务类，它提供方法Validate()来实现身份验证
 * @date 2022/1/3 1:20
 */
public class AccessValidator {
    public boolean validate(String userName) {
        boolean flag = "杨过".equals(userName);
        System.out.println("登录" + (flag ? "成功" : "失败"));
        return flag;
    }
}
